<?php

class NewsController extends CF_Controller_Action
{

    public function indexAction()
    {
        $request = $this->getRequest();
        $linkID = urldecode($request->getParam('link_id',0));
        if($linkID > 0){
        	$url = Application_Model_RssReaderApi::getLink((int)$linkID)->url;
        	if(!empty($url)){
        		$channel = new Zend_Feed_Rss($url);
        		$this->view->feeds = $channel;
        		Application_Model_RssReaderApi::addNewFeeds($channel, $linkID);
        		Application_Model_RssReaderApi::addTagOccurances();
        	}
        }
    }

}

